import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: ()=>import('../views/Login'),
  },
  {
    path: '/adminIndex',
    name: 'adminIndex',
    component: ()=>import('../views/admin/AdminIndex'),
    children:[
      {path: '/getRoom', name: 'getRoom', component: ()=>import('../views/admin/GetRoom')},
      {path: '/disposeAppoint', name: 'disposeAppoint', component: ()=>import('../views/admin/DisposeAppoint')},
      {path: '/adminGetNotice', name: 'adminGetNotice', component: ()=>import('../components/GetNotice')},
      {path: '/adminUserInfo', name: 'adminUserInfo', component: ()=>import('../views/admin/AdminUserInfo')},
      {path: '/releaseNotice', name: 'releaseNotice', component: ()=>import('../views/admin/ReleaseNotice')},
      {path: '/changePassword', name: 'changePassword', component: ()=>import('../views/admin/ChangePassword')},
      {path: '/getAppoint', name: 'getAppoint', component: ()=>import('../views/admin/GetAppoint')},
    ]
  },
  {
    path: '/studentIndex',
    name: 'studentIndex',
    component: ()=>import('../views/student/StudentIndex'),
    children:[
      {path: '/stuGetRoom', name: 'stuGetRoom', component: ()=>import('../views/student/StuGetRoom')},
      {path: '/stuInformation', name: 'stuInformation', component: ()=>import('../components/Information')},
      {path: '/myAppoint', name: 'myAppoint', component: ()=>import('../views/student/MyAppoint')},
      {path: '/stuGetNotice', name: 'stuGetNotice', component: ()=>import('../components/GetNotice')},
    ]
  },
  {
    path: '/teacherIndex',
    name: 'teacherIndex',
    component: ()=>import('../views/teacher/TeacherIndex'),
    children: [
      {path: '/teaInformation', name: 'teaInformation', component: ()=>import('../components/Information')},
      {path: '/teaGetNotice', name: 'teaGetNotice', component: ()=>import('../components/GetNotice')},
      {path: '/teacherGetRoom', name: 'teacherGetRoom', component: ()=>import('../views/teacher/TeacherGetRoom')},
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
